def isPerfectNumber(n):
    sum = 0 
    for i in range(1, n//2 + 1):
        if n % i == 0:  
            sum += i
    return n == sum

n = int(input("请输入一个整数："))
if isPerfectNumber(n):
    print("{}是完数！".format(n))
else:
    print("{}不是完数！".format(n))
